package com.ele.utils;

import com.alibaba.druid.pool.DruidDataSource;

import javax.sql.DataSource;

public class JDBCUtils {
    private static DruidDataSource dataSource;

    static{
        dataSource = new DruidDataSource();
        dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        dataSource.setUsername("root");
        dataSource.setPassword("root");
        dataSource.setUrl("jdbc:mysql://127.0.0.1:3306/javaweb_ele");
    }
    public static DataSource getDatasource(){
        return dataSource;
    }
}
